<template>
    <el-date-picker class="dateRangePicker" popper-class="eq-date-range-popper" v-model="searchForm[data['prop']]" :type="dateType" unlink-panels range-separator="至" start-placeholder="开始日期"
        end-placeholder="结束日期" :shortcuts="shortcuts" :format="dateFormat" :valueFormat="dateFormat"/>
</template>

<script setup>
import { ref } from 'vue';

import { getDatePickOptions } from '@/utils/date';

const props = defineProps({
    data: {
        type: Object,
        default: () => {}
    }
});

const shortcuts = ref(getDatePickOptions());
const dateFormat = ref('YYYY-MM-DD HH:mm:ss');
const dateType = ref('datetimerange');

const searchForm = defineModel('searchForm');

</script>

<style lang="scss">
@import './DateTimeRangePicker.scss';
</style>